package cn.com.nes.site.service.monitor;

import cn.com.nes.mybatis.agent.ope.entity.IsEquipmentInfo;
import cn.com.nes.site.entity.PageData;
import cn.com.nes.site.entity.bo.workorder.SaveWorkOrderEquipmentInfoBO;
import cn.com.nes.site.entity.vo.fault.FaultVo;
import cn.com.nes.site.entity.vo.monitor.BrandVo;
import cn.com.nes.site.entity.vo.monitor.GetEquipmentInfoOperationConditionHistoryVo;
import cn.com.nes.site.entity.vo.monitor.SavePersonalProtocolDataToMemoryVo;
import cn.com.nes.site.service.monitor.bo.EquipmentBO;
import cn.com.nes.site.service.monitor.dto.EquipmentDTO;
import cn.com.nes.site.service.monitor.dto.EquipmentInfoDTO;
import com.baomidou.mybatisplus.extension.service.IService;
import org.apache.ibatis.annotations.Param;

import java.sql.SQLException;
import java.util.Date;
import java.util.List;
import java.util.Map;

public interface EquipmentService extends IService<IsEquipmentInfo> {

    List<Map<String, Object>> getBrand(BrandVo vo) throws Exception;
    PageData getHistoricalFaultSbList(FaultVo vo);

    PageData savePersonalProtocolDataToMemory(SavePersonalProtocolDataToMemoryVo vo);

    PageData getEquipmentInfoOperationConditionHistory(GetEquipmentInfoOperationConditionHistoryVo vo);

    Integer saveEquipmentInfo(IsEquipmentInfo isEquipmentInfo) throws SQLException;

    /**
     * 派单保存设备信息
     */
    String saveWorkOrderEquipmentInfo(SaveWorkOrderEquipmentInfoBO bo) throws Exception;

    /**
     * 根据工单id查询设备列表
     */
    List<EquipmentInfoDTO> getEquipmentInfoListByWorkOrderId(Long workOrderId);
    /**
     * 根据地点id查询设备列表
     */
    public List<EquipmentInfoDTO> getEquipmentInfoListByDDid(String ddid);

    List<EquipmentInfoDTO> getEquipmentInfoS(@Param("equipmentIds") String equipmentIds) throws Exception;

    /**
     * 根据设备id删除设备信息
     * @param id
     */
    void delEquipmentInfoById(Long id);


    /**
     * 获取设备列表
     * @param bo
     * @return
     * @throws Exception
     */
    List<EquipmentDTO> getEquipmentList(EquipmentBO bo) throws Exception;

    /**
     * 根据安装工单id列表删除设备信息 - 逻辑删除
     */
    void delEquipmentInfoByWorkOrderId(List<Long> workOrderIdList, Date operateDate, Long operateUserId);
}
